//
//  MyCell.m
//  CCSD
//
//  Created by hwd on 17/9/19.
//  Copyright © 2017年 张露杰. All rights reserved.
//

#import "MyCell.h"
@interface MyCell()
@end
@implementation MyCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self setUpUI];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

- (void)setUpUI
{
    if (!_headerImageV) {
        
        //前面的图片
        _headerImageV = [TomamaUI createImageView:CGRectMake(15*screenW_6,12.5*screenW_6,25*screenW_6,25*screenW_6) backGroundImageV:@"mrPic"];
        [self addSubview:_headerImageV];
        
        //标题
        _titleLab = [TomamaUI createLabel:CGRectMake(50*screenW_6,0*screenW_6,SCREENW-150*screenW_6,50*screenW_6) textAligment:0 font:[UIFont systemFontOfSize:16*screenW_6] textColor:[UIColor colorWithHexString:@"#333333"] text:@""];
        [self addSubview:_titleLab];
        
        //线条
        _lineLab = [ToolViewVC addCellLineLab:CGRectMake(15*screenW_6,49*screenW_6,SCREENW-15*screenW_6, 1*screenW_6)];
        [self addSubview:_lineLab];
    }
}
-(void)setHeaderStr:(NSString *)headerStr
{
    _headerImageV.image = [UIImage imageNamed:headerStr];
    _headerImageV.frame = CGRectMake(15*screenW_6, 25*screenW_6-_headerImageV.image.size.height/2, _headerImageV.image.size.width, _headerImageV.image .size.height);
}
-(void)setTitleStr:(NSString *)titleStr
{
    _titleLab.text = titleStr;
    _lineLab.hidden = [titleStr isEqualToString:@"关于我们"]?YES:NO;
}
@end
